package com.zy.business.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description 销假
 * @Author  zhangxiaojia
 * @Date 2020-11-05
 */
@Data
@EqualsAndHashCode
@ApiModel
@TableName ("tb_report_back" )
public class TbReportBack implements Serializable {

	/**
	 * 主键
	 */
	@TableId(value = "id")
	private Long id;

	/**
	 * 请假id
	 */
   	 @TableField(value = "absence_id")
	 @ApiModelProperty(value = "请假id", required = true)
	private Long absenceId;

	/**
	 * 销假时长
	 */
   	 @TableField("report_back_duration" )
	 @ApiModelProperty(value ="销假时长",required = true)
	private Double reportBackDuration;

	/**
	 * 销假事由
	 */
   	 @TableField("report_back_reason" )
	 @ApiModelProperty(value ="销假事由",required = true)
	private String reportBackReason;

	/**
	 * 销假时间
	 */
	@TableField("report_back_time" )
	@ApiModelProperty(value ="销假时间",required = true)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
   	 private Date reportBackTime;

	/**
	 * 申请时间
	 */
	@TableField("apply_time" )
	@ApiModelProperty(value ="申请时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date applyTime;

	/**
	 * 审批意见
	 */
	@TableField(value = "APPROVE_REASON",updateStrategy = FieldStrategy.IGNORED)
	@ApiModelProperty(value ="审批意见")
	private String approveReason;

	/**
	 * 状态（1.待审批2.同意3.拒绝）
	 */
	@TableField("state" )
	@ApiModelProperty(value ="状态（1.待审批2.同意3.拒绝）")
	private Integer state;

	/**
	 * 审批时间
	 */
	@TableField(value = "approve_time",updateStrategy = FieldStrategy.IGNORED)
	@ApiModelProperty(hidden = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date approveTime;

	/**
	 * 删除标志0未删除1已删除
	 */
	@TableLogic
	@TableField(value = "del_flag")
	@ApiModelProperty(hidden = true)
	private Integer delFlag;


	@TableField(exist = false)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
	private Date endTime;

}
